package com.abc.model;

import java.util.Collection;

public class EffortReport {
	ReportRepository repository;
	String year;

	public EffortReport(ReportRepository repository, String year) {
		repository = repository;
		Collection<Project> projects = repository.getProjects().values();
		for (Project it : projects) {
			ProjectYear projectYear = it.getProjectYears().get(year);
			if (projectYear != null) {

				StringBuffer sb = new StringBuffer();
				for (int monthNr = 1; monthNr <= 12; monthNr++) {
					sb.append(" " + projectYear
							.getTotalMonthlyEffort(monthNr));
				}
				System.out.println("Projekt: " + it.getName() + sb.toString());
			}
		}
	}
}
